Fix a bug with snapshots that was introduced with the crc code.
$(INSTALL_PROG) $(IBINS) $(DESTDIR)/$(BLKTAP_INSTALL_DIR)
clean:
- rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS blkdump $(VDI_TOOLS) parallax
+ rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS blkdump $(VDI_TOOLS) parallax vdi_unittest
rpm: all
rm -rf staging
\r
void clear_w_bits(radix_tree_node node) \r
{\r
+ int i;
+ for (i=0; i<RADIX_TREE_MAP_ENTRIES; i++)
+ node[i] = node[i] & ONEMASK;
+ return;
+}
+
+void clear_L3_w_bits(radix_tree_node node)
+{
int i;
for (i=0; i<RADIX_TREE_MAP_ENTRIES; i+=2)
node[i] = node[i] & ONEMASK;
\r
DPRINTF("READ_L3_L2f\n");\r
node = (radix_tree_node) IO_BLOCK(r);\r
- clear_w_bits(node);\r
+ clear_L3_w_bits(node);
if (node == NULL) goto fail;\r
a = node[L2_IDX(req->vaddr)];\r
addr = getid(a);\r
\r
DPRINTF("READ_L3_L1f\n");\r
node = (radix_tree_node) IO_BLOCK(r);\r
- clear_w_bits(node);\r
+ clear_L3_w_bits(node);
if (node == NULL) goto fail;\r
a = node[L2_IDX(req->vaddr)];\r
addr = getid(a);\r
#include <pthread.h>
#include "blockstore.h"
#include "block-async.h"
+#include "requests-async.h"
#include "radix.h"
#include "vdi.h"
freeblock(vdi);
}
-u64 vdi_lookup_block(vdi_t *vdi, u64 vdi_block, int *writable)
-{
- u64 gblock;
-
- gblock = lookup(VDI_HEIGHT, vdi->radix_root, vdi_block);
-
- if (writable != NULL) *writable = iswritable(gblock);
-
- return getid(gblock);
-}
-
-void vdi_update_block(vdi_t *vdi, u64 vdi_block, u64 g_block)
-{
- u64 id;
-
- /* updates are always writable. */
- id = writable(g_block);
-
- vdi->radix_root = update(VDI_HEIGHT, vdi->radix_root, vdi_block, id);
- writeblock(vdi->block, vdi);
-}
-
void vdi_snapshot(vdi_t *vdi)
{
snap_rec_t rec;